package lab04.test02;

/**
 *第一个线程每隔1秒向控制台输出“Hello, World!”
 */
public class HelloWorldThread extends Thread {
    //每隔一秒向控制台输出"Hello,World!"
    @Override
    public void run() {
    while(true) {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Hello,World!");
    }
}
}
